package com.jic.member.mapper;

import java.lang.Long;
import java.util.List;

import com.jic.common.base.vo.AdminOperate;
import com.jic.common.base.vo.RestResult;
import com.jic.member.entity.MememberGrowthAction;
import com.jic.member.entity.MememberGrowthRule;
import com.jic.member.request.MemberGrowthRuleRequest;
import com.jic.member.response.MemberGrowthRuleResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 会员等级管理-成长值规则主表
 * @author : 
 * @email : 
 * @since : 2020-04-08 03:50:24
 * @version : v1.0.0
 */
@Mapper
public interface  MememberGrowthRuleMapper {

    long insert(MememberGrowthRule mememberGrowthRule);

    long delete(Long id);

    long update(MememberGrowthRule mememberGrowthRule);

    MememberGrowthRule queryByPrimaryKey(Long id);

    List<MememberGrowthRule> query(MememberGrowthRule mememberGrowthRule);

    List<MememberGrowthRule> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("mememberGrowthRule") MemberGrowthRuleRequest mememberGrowthRule);

    long queryPageCount( @Param("mememberGrowthRule") MemberGrowthRuleRequest mememberGrowthRule);

    MememberGrowthAction getRrowthRuleById(Long id);

    long delByRuleId(Long id);

    long updateGrowthRuleStatus(MememberGrowthRule mememberGrowthRule);

    long startRuleCount(MememberGrowthRule mememberGrowthRule);

    //综合查询成长值规则列表
    List<MemberGrowthRuleResponse> queryGrowthRule(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("mememberGrowthRule") MemberGrowthRuleRequest mememberGrowthRule);

    long queryRuleCount( @Param("mememberGrowthRule") MemberGrowthRuleRequest mememberGrowthRule);

    MemberGrowthRuleResponse getDeptInfoById(Long id);

    List<MemberGrowthRuleResponse> getRulistByChild (@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("mememberGrowthRule") MemberGrowthRuleRequest mememberGrowthRule);

    long getRulistByChildCount( @Param("mememberGrowthRule") MemberGrowthRuleRequest mememberGrowthRule);

    MememberGrowthRule queryGrowthRuleByDeptIdAndDeptTypeAndObtainMode(@Param("obtainMode") String obtainMode,@Param("adminOperate") AdminOperate adminOperate);
}